<h1>Edytujesz cechy produktu: {assign var=pDesc value=$obj->getDescription($default_language_id)} {$pDesc->getName()}</h1>
<form method="post">
{mainoptions name="cechy"}
	<table class="commonTable" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<th>
				Nazwa cachy
			</th>
			<th>
				Prefix
			</th>
			<th>
				Wartość
			</th>
			<th>
				Postfix
			</th>
			<th>
				Prefix - metric
			</th>
			<th>
				Wartość - metric
			</th>
			<th>
				Postfix - metric
			</th>
		</tr>
		{assign var=prev value=0}
		{foreach from=$list item=property}
		{if $property->getIdPropertyGroup() neq $prev}
		<tr>
			<td colspan="7" style="color: #F7F7F7; background-color: #505052;">
			<b>{$property->propertyGroupDescription->getDescription($default_language_id)}</b>
			</td>
		</tr>
		{assign var=prev value=$property->getIdPropertyGroup()}
		{/if}
		<tr>
			<td>
				{$property->getName()}
			</td>
			
			{assign var=value value=$property->getPropertyValueArr($obj->getId())}
			
			<td>
				<input type="text" size="5" name="property_prepend[{$value.0->getId()}]" value="{$value.0->getPrepend()}" />
			</td>
			<td>
				<input type="text" size="5" name="property_value[{$value.0->getId()}]" value="{$value.0->getValue()}" />
			</td>
			<td>
				<input type="text" size="5" name="property_append[{$value.0->getId()}]" value="{$value.0->getAppend()}" />
			</td>
			<td>
				<input {if $property->getType() == 0}disabled="disabled" class="disabled"{/if} type="text" size="5" name="property_prepend[{$value.1->getId()}]" value="{$value.1->getPrepend()}" />
			</td>
			<td>
				<input {if $property->getType() == 0}disabled="disabled" class="disabled"{/if} type="text" size="5" name="property_value[{$value.1->getId()}]" value="{$value.1->getValue()}" />
			</td>
			<td>
				<input {if $property->getType() == 0}disabled="disabled" class="disabled"{/if} type="text" size="5" name="property_append[{$value.1->getId()}]" value="{$value.1->getAppend()}" />
			</td>
			{if $property->hasDefaultValues() eq 1}
		</tr><tr><td></td>
			{assign var=defaults value=$property->getDefaultValues()}
			<td colspan="3">
				<select name="property_parent[{$value.0->getId()}]">
					{foreach from=$defaults.0 item=defValue}
					<option {if $value.0->getParent() eq $defValue->getId()}selected="selected"{/if} value="{$defValue->getId()}">{$defValue->getPrepend()} {$defValue->getValue()} {$defValue->getAppend()}</option>
					{/foreach}
				</select>
			</td>
			<td colspan="3">
				<select {if $property->getType() == 0}disabled="disabled" class="disabled"{/if} name="property_parent[{$value.1->getId()}]">
					{foreach from=$defaults.1 item=defValue}
					<option {if $value.1->getParent() eq $defValue->getId()}selected="selected"{/if} value="{$defValue->getId()}">{$defValue->getPrepend()} {$defValue->getValue()} {$defValue->getAppend()}</option>
					{/foreach}
				</select>
			</td>
			{/if}
		</tr>
		{/foreach}
	</table>


{/mainoptions}
	{mainoptions}
		<input type="submit" value="Zapisz i przejdź do listy" />
		<input type="button" value="Anuluj" onclick="document.location='{url product=index}'" />
	{/mainoptions}
</form>